﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/Admin/_AdminLayout.cshtml";
}
@using PagedList
@using PagedList.Mvc
@model IEnumerable<BabyToys.Models.Menu>
<div id="content" class="span10">
    <!-- content starts -->
    <div>
        <ul class="breadcrumb">
            <li>
                <a href="#">Home</a> <span class="divider">/</span>
            </li>
            <li>
                <a href="#">Nhật kí hệ thống</a>
            </li>
        </ul>
    </div>
    <div class="row-fluid sortable">
        <div class="box span12">
            <div class="box-content">
                
                    <div style="height:10px;"></div>
                        <table class="table table-striped table-bordered bootstrap-datatable datatable">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>Tên Control</th>
                                    <th>Tên Action</th>
                                    <th>User thực hiện</th>
                                    <th>Thời Gian</th>
                                    <th></th>
                                </tr>
                                
                            </thead>
                            <tbody>
                                @{PagedList<BabyToys.Models.Log> logs = ViewBag.OnePageOfLog;}
                               @foreach (var log in logs)
                            {
                                <tr class="item_row" style="border-color: #F0F0F0; border-style: Solid; height: 40px;">
                                    <td class="item_float">
                                        <label>
                                            @log.IdLog
                                        </label>
                                    </td>
                                    <td class="item_float">
                                        <label>
                                            @log.Controller
                                        </label>
                                    </td>
                                    <td class="item_float">
                                        <label>
                                            @log.Action
                                        </label>
                                    </td>
            
                                    <td class="item_float">
                                        <label>
                                            @if(log.User!=null)
                                            {
                                                @:<label>@log.User.TenDangNhap</label>
                                            }
                                        </label>
                                    </td>
                                    <td class="item_float">
                                        <label>
                                            @log.Time
                                        </label>
                                    </td>
                                    <td class="item_float">
                                        <div class="hidden-phone visible-desktop action-buttons">
                                            <a href="#" class="small red button btnSua">Xóa</a>
                                        </div>
                                    </td>
                                </tr>
                            }
                            </tbody>
                        </table>
                    
                @Html.PagedListPager((IPagedList)ViewBag.OnePageOfLog, page => Url.Action("Index", new { page }), PagedListRenderOptions.OnlyShowFivePagesAtATime)
            </div>
        </div>
    </div>
</div>



